package day10_poly.多态作业;
//培根披萨
public class BaconPizza extends Pizza{
    private int gram;//克数
    public BaconPizza() {
        super();
    }
    public int getGram() {
        return gram;
    }

    public void setGram(int gram) {
        this.gram = gram;
    }

    public BaconPizza(String kind, int price, int size, int gram) {
        super(kind, price, size);
        this.gram = gram;
    }

    public BaconPizza(int gram) {
        this.gram = gram;
    }
    public void show() {
        System.out.println("名称："+super.getKind());
        System.out.println("价格："+super.getPrice()+"元");
        System.out.println("大小："+super.getSize()+"寸");
        System.out.println("培根克数："+this.gram);
    }
}
